const moment = require('moment');
const path = require('path')
module.exports = {
    title: 'Mason',
    base: '/',
    lang: 'zh-CN',
    head: [
        ['link', {rel: 'icon', href: '/favicon.ico'}],
        ['link', {rel: 'manifest', href: '/manifest.json'}],
        ['meta', {name: 'theme-color', content: '#3eaf7c'}],
        ['meta', {name: 'apple-mobile-web-app-capable', content: 'yes'}],
        ['meta', {name: 'apple-mobile-web-app-status-bar-style', content: 'black'}],
        ['link', {rel: 'apple-touch-icon', href: '/icons/apple-touch-icon-152x152.png'}],
        ['link', {rel: 'mask-icon', href: '/icons/safari-pinned-tab.svg', color: '#3eaf7c'}],
        ['meta', {name: 'msapplication-TileImage', content: '/icons/msapplication-icon-144x144.png'}],
        ['meta', {name: 'msapplication-TileColor', content: '#000000'}]
    ],
    dest: './docs/.vuepress/dist',
    palette: path.resolve(__dirname, 'palette.styl'),
    ga: '',
    evergreen: true,
    markdown: {
        lineNumbers: true,
    },
    serviceWorker: {
        updatePopup: {
            message: "发现新内容可用.",
            buttonText: "刷新",
        },
    },
    footer: "000",
    themeConfig: {
        // 导航栏
        logo: '/logo.svg',
        // tags:"/tag",
        nav: [
            {text: '首页', link: '/'},
            {text: '笔记', link: '/views/'},
            {text: '工具', link: '/tool/'},
            {text: 'GO', link: '/go/'},
            {text: 'OFFER', link: "/offer/"},
            {text: '个人项目', link: '/project/'},
            {text: '关于', link: '/about/'},
        ],
        //侧边栏
        sidebarDepth: 2,
        sidebar: {
            '/views/': [
                '',
                {
                    title: '后端',
                    children: [
                        '后端/base',
                        '后端/JAVA',
                        '后端/Python',
                        '后端/GIT',
                        '后端/others',
                    ]
                },
                {
                    title: '前端',
                    children: [
                        '前端/vue',
                    ]
                },
                {
                    title: '运维',
                    children: [
                        '运维/Linux',
                        '运维/Docker',
                        '运维/Nginx',
                        '运维/Database',
                    ]
                },
                {
                    title: '网络',
                    children: [
                        '网络/网络协议',
                        '网络/杂项',
                    ]
                },
                {
                    title: '测试',
                    children: [
                        '测试/AirTest',
                        '测试/PostMan',
                        '测试/Jmeter',
                    ]
                },
                {
                    title: '杂项',
                    children: [
                        '杂项/TODO',
                        '杂项/版本更迭',
                    ]
                },
            ],
            '/go/': [
                '',
                {
                    title: '语言基础',
                    children: [
                        'base/base',
                        'base/style',
                        'base/type',
                        'base/function',
                        'base/goroutines',
                    ]
                },
                {
                    title: '标准库',
                    children: [
                        'stdlib/fmt',
                        'stdlib/strings',
                    ]
                },
                {
                    title: '数据库',
                    children: [
                        'database/MySQL',
                        'database/Redis',
                        'database/MongoDB'
                    ]
                },
                {
                    title: 'web编程',
                    children: [
                        'web/http',
                        'web/gin',
                    ]
                },
            ],
            '/tool/': [
                '',
                {
                    title: '基础命令',
                    children: [
                        'CMD/Shell',
                        'CMD/Docker',
                        'CMD/Nginx',
                        'CMD/Git',
                        'CMD/SQL',
                    ]
                },
                {
                    title: '实用package',
                    children: [
                        'stars/star'
                    ]
                }
            ],
            '/offer/': [
                {
                    title: '基础', children: [
                        'base/基础'
                    ]
                }
            ]
        },

        // 页面滚动
        smoothScroll: true,
        locales: {
            '/': {
                // 多语言下拉菜单的标题
                selectText: 'Language',
                // 该语言在下拉菜单中的标签
                label: '简体中文',
                // 编辑链接文字
                editLinkText: '帮我在 Gitee 上改善这个页面',
            },
        },

        lastUpdated: '上次更新', // string | boolean

        // // Git 仓库和编辑链接
        // repo: 'https://gitee.com/masonxu01/blog', // 你的仓库
        // repoLabel: 'Gitee', // 导航栏上的文本
        editLinks: true,
        // 假如文档不是放在仓库的根目录下：
        docsDir: 'docs',

    },

    locales: {
        // 键名是该语言所属的子路径
        // 作为特例，默认语言可以使用 '/' 作为其路径。
        '/': {
            lang: 'zh-CN',
            title: 'Mason\'s Blog',
            // description: '互联网技术分享、学习、交流的个人技术博客'          
        }
    },
    plugins: [
        ['@vuepress/back-to-top'],
        ['@vuepress/nprogress'],
        ['@vuepress/theme-blog'],
        ['@vuepress/pwa', {
            serviceWorker: true,
            updatePopup: true
        }],
        ['@vuepress/last-updated']
    ]
}
